<template>
	<view class="my-self">
		<!-- 自我介绍的模板 start -->
		
		<uni-forms :modelValue="formData">
			<uni-forms-item label="姓名"  required>
				<uni-easyinput type="text" v-model="formData.name" placeholder="请输入姓名" />
			</uni-forms-item>
			<uni-forms-item required  label="出生年月">
				<uni-datetime-picker
					type="date"
					:value="formData.brithday"
					@change="change($event,1)"
				/>
			</uni-forms-item>
			<uni-forms-item required  label="工作年限" >
				<uni-easyinput type="number" v-model="formData.work" placeholder="请输入工作年限" />
			</uni-forms-item>
			<uni-forms-item required  label="手机号" >
				<uni-easyinput type="number" v-model="formData.phone" placeholder="请输入手机号" />
			</uni-forms-item>
			<uni-forms-item  required label="邮箱">
				<uni-easyinput type="text" v-model="formData.email" placeholder="请输入邮箱" />
			</uni-forms-item>
			<uni-forms-item required  label="学历">
				<uni-easyinput type="text" v-model="formData.student" placeholder="请输入最高学历" />
			</uni-forms-item>
			<uni-forms-item required  label="专业">
				<uni-easyinput type="text" v-model="formData.major" placeholder="请输入所学专业" />
			</uni-forms-item>
			<uni-forms-item required  label="求职状态">
				<uni-easyinput type="text" v-model="formData.status" placeholder="请输入当前在职/离职" />
			</uni-forms-item>
			<uni-forms-item required  label="求职意向">
				<uni-easyinput type="text" v-model="formData.evaluation" placeholder="请输入求职职位" />
			</uni-forms-item>
			<uni-forms-item required  label="到岗日期">
				 <uni-datetime-picker
					type="date"
					:value="formData.single"
					@change="change($event,2)"
				/>
			</uni-forms-item>
			<uni-forms-item   label="微信">
				<uni-easyinput type="text" v-model="formData.wx" placeholder="请输入微信" />
			</uni-forms-item>
			<uni-forms-item   label="QQ">
				<uni-easyinput type="text" v-model="formData.qq" placeholder="请输入QQ" />
			</uni-forms-item>
			<uni-forms-item   label="现居地">
				<uni-easyinput type="text" v-model="formData.address" placeholder="请输入现居地址" />
			</uni-forms-item>
			<uni-forms-item   label="职业">
				<uni-easyinput type="text" v-model="formData.job" placeholder="请输入首页要显示的职业名称" />
			</uni-forms-item>
			<uni-forms-item   label="自我介绍">
				<uni-easyinput type="textarea" maxlength="-1" v-model="formData.myself" placeholder="请来一段自我介绍吧" />
			</uni-forms-item>
		</uni-forms>
		
		
		<!-- 自我介绍的模板 end -->
	</view>
</template>

<script>
	export default{
		name:'mySelf',
		data(){
			return{
				formData: {},
				
			}
		},
		methods:{
			//日期选择器
			change(e,k){
				console.log(e,k);
				if(k === 1){
					this.formData.brithday = e;
				}else{
					this.formData.single = e;
				}
			}
		},
		computed:{
			getList(){
				return this.$store.state.oneList
			}
		},
		watch:{
			getList(val){
				this.formData = val
			}
		}
	}
</script>

<style>
	.my-self{
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		padding: 40upx;
	}
</style>
